import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import Home from '@/views/Home'
import Cinema from '@/views/Cinema'
import News from '@/views/News'
import My from '@/views/My'
import Playing from '@/views/children/Playing'
import Willplay from '@/views/children/Willplay'
import Detail from '@/views/Detail'
import Like from '@/views/Like'
import Collect from '@/views/Collect'
import Set from '@/views/children/Set'

export default new VueRouter({
    mode: 'history',
    routes: [
        { path: '/', redirect: '/home' },
        {
            path: '/home', component: Home, name: 'home', meta: { 'tabbarShow': true },
            children: [
                { path: '', redirect: 'playing' },
                { path: 'playing', component: Playing, name: 'playing', meta: { 'tabbarShow': true } },
                { path: 'willplay', component: Willplay, name: 'willplay', meta: { 'tabbarShow': true } },
            ]
        },
        { path: '/detail/:filmId', component: Detail, name: 'detail', meta: { 'tabbarShow': false } },
        { path: '/cinema', component: Cinema, name: 'cinema', meta: { 'tabbarShow': true } },
        { path: '/news', component: News, name: 'news', meta: { 'tabbarShow': true } },
        { path: '/my', component: My, name: 'my', meta: { 'tabbarShow': true }, },
        { path: '/set', component: Set, name: 'set', meta: { 'tabbarShow': false } },
        { path: '/like', component: Like, name: 'like', meta: { 'tabbarShow': false } },
        { path: '/collect', component: Collect, name: 'collect', meta: { 'tabbarShow': false } },

    ]
})